from nodetypes.formats.mml.Events import ResetEventHandler as EventHandler
from nodetypes.services import Query
from forms import Reset

from nodetypes.services.RdfQueryConfig import Serializer as ConfigSerializer


class EventHandler(EventHandler):
    
    newResetForm            = Reset.Form    
    query                   = Query.Query()
    
    newConfigSerializer     = ConfigSerializer
    
    def process(self, context, source):
        eventData = context.event.data            
        eventData.config = self.newConfigSerializer().deserialize(source.asInputSource())
        return super(EventHandler,self).process(context, source)
        
del Reset, Query, ConfigSerializer